<template>
  <!-- <el-menu
    :default-active="activeIndex"
    class="el-menu-demo"
    mode="horizontal"
    background-color="#545c64"
    text-color="#fff"
    active-text-color="#ffd04b"
    @select="handleSelect"
  >

  <el-menu-item v-for="(item,index) in routeList" :key="index" :index="item.path"> -->
    <!-- <el-icon><component :is="item.icon" /></el-icon>
    <span>{{item.title}}</span> -->
    <!-- <template #title>{{item.title}}</template> -->
    <!-- <el-menu-item v-for="(item1,index1) in item.children" :key="index1" :index="item1.path">{{item1.title}}</el-menu-item> -->
  <!-- </el-menu-item> -->

    <!-- <el-menu-item index="0"><el-icon><PartlyCloudy color="#fff"/></el-icon></el-menu-item>
    <el-menu-item index="1">首页</el-menu-item>
    <el-sub-menu index="2">
      <template #title>公司</template>
      
      <el-menu-item index="2-1">公司架构</el-menu-item>
      <el-menu-item index="2-2">项目实现</el-menu-item>
      <el-menu-item index="2-3">公司新闻</el-menu-item>
    </el-sub-menu>
    <el-menu-item index="3">工程项目</el-menu-item>
    <el-menu-item index="3">企业文化</el-menu-item>
    <el-menu-item index="4">联系我们</el-menu-item> -->
  <!-- </el-menu> -->
  <div class="header">
    <img src="../assets/logo.png" alt="">
    <a-menu 
      mode="horizontal" 
      :items="routeList" 
      @click="handleClick" 
    />
  </div>
</template>

<script setup>
import {routeList} from '../data.js';
import { useRouter } from 'vue-router';
const router = useRouter()
const handleClick = e => {
  router.push(e.item.path)
};
</script>

<style lang="scss" scoped>
.header{
  display: flex;
  align-items: center;
  img{
    width: 30px;
    height: 30px;
    margin:0 30px 0 20px;
  }
}
</style>